﻿<?php
/********************************************************
 *
 * 此文件的作用:
 *		前台控制器
 *
 * @copyright Copyright (c) 2008-2009
 * @author 刘昌功 lcg635@126.com
 *
 ********************************************************/
defined('APP_DIR') or die('404 Not Found');

FLEA::loadClass('Common_Action');

class Controller_Default extends Common_Action {
	function __construct($ctlName) {
		parent::__construct($ctlName);
		$this->tplDir = TPL_F;//模板位置
		$data = array(
			'header' => TPL . $this->tplDir . 'header.php',
			'footer' => TPL . $this->tplDir . 'footer.php'
		);
		$this->tpl->assign($data);
	}

 	function index() {
	//	$_modUser = FLEA::getSingleton('Model_Users');
		$_modNews = FLEA::getSingleton('Model_News');
		$viewData = array(
			//'users' => $_modUser->getList(),
			'indexNews' => $_modNews->getList('index', 0, 10, 'top 5'),
			'tNews' => $_modNews->getList('jj', 0, 55, 0)
		);
		//dump($viewData);
		$this->_out('index', $viewData);
	}
	
	function download() {
		$this->_out('download');
	}

}